<!--
 * @Author: yuqy
 * @Date: 2023-04-10 19:26:39
 * @LastEditors: yuqy
 * @LastEditTime: 2023-10-23 18:28:16
 * @Descripttion: -
-->
<template>
  <div style="overflow: hidden;">
    <!-- 个人信息 -->
    <div class="person_wrap">
      <div class="header_wrap">
        <h2 class="js-drag" style="width: 100%;-webkit-app-region: drag;">个人中心</h2>
        <div class="menu_wrap" >
          <!-- v-if="!APP_IS_Web"  -->
          <Icon type="md-remove" v-if="!APP_IS_Web" style="margin-right: 10px;" @click="exit(1)"/>
          <!-- <Icon type="md-close" class="close" @click="close(2)"/> -->
          <Icon type="md-close" class="close" @click="exit(2)"/>
        </div>
      </div>
      <!-- <personal/> -->
      <person-model />
    </div>
  </div>
</template>
<script >
import { mapState } from "vuex";
import { Icon } from "view-ui-plus";
import PersonModel from '@/components/user/person.vue';
const userMsgBc = new BroadcastChannel('getUserMainMsg');
export default {
  setup() {},
  computed: {
    ...mapState({
      userInfo: state => state.user.userInfo
    })
  },
  data() {
    return {};
  },
  components: {
    Icon, PersonModel
  },
  mounted() {},
  methods: {
    exit(type) {
      if (type == 1) {
        return userMsgBc.postMessage({ type: 'isMini', name: this.$route.name })
      }
      localStorage.isSelfClose = true
      window.close()
    }
  }
};
</script>
<style scoped lang="less">
@import url("./less/person.less");
</style>
